<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title>顾客信息</title>
<link type="text/css" th:href="@{/html/css/bootstrap.min.css}"
	rel="stylesheet" />
<script type="text/javascript" th:src="@{/html/js/jquery-1.12.4.js}"></script>
<script type="text/javascript" th:src="@{/html/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/html/js/vue.min.js}"></script>
<script type="text/javascript" th:src="@{/html/js/axios.min.js}"></script>
</head>
<body>
	<div id="app" class="container-fluid" style="margin-top: 10px;">
		<form class="form-horizontal col-sm-6" method="post" th:action="@{/user/info}">
			<div class="form-group">
				<label class="col-sm-2 control-label">头像:</label>
				<div class="col-sm-10">
					<img class="img-thumbnail" style="height: 40px;"
						th:src="@{/photo/{username}(username=${session.user.username})}" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">用户名:</label>
				<div class="col-sm-10">
					<input type="text" name="user" class="form-control" th:value="${session.user.custVO.user}" readonly="readonly"  />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">性别:</label>
				<div class="col-sm-10">
					<select class="form-control" name="cgender" required="required">
                    	<option value="">请选择</option>
                    	<option th:each="dict : ${dicts}" th:if="${session.user.custVO.cgender eq dict.dvalue}" selected="selected" th:value="${dict.dvalue}" th:text="${dict.dvalue}"></option>
                    	<option th:each="dict : ${dicts}" th:unless="${session.user.custVO.cgender eq dict.dvalue}" th:value="${dict.dvalue}" th:text="${dict.dvalue}"></option>
                    </select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">邮箱:</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="cemail" required="required" th:value="${session.user.custVO.cemail}" placeholder="请输入电子邮箱"  />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">手机:</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="cphone" required="required" th:value="${session.user.custVO.cphone}" placeholder="请输入手机号码"  />
				</div>
			</div>
			<div class="form-group">
                <div class="col-md-4 col-md-offset-2">
                    <button type="submit" class="btn">更新个人信息</button>
                </div>
                <div class="col-md-6 help-block" th:text="${message}"></div>
            </div>
		</form>
	</div>
</body>
</html>